<?php 
	//---  获得post数据  ---
	$userID = $_REQUEST['UserID'];
	//－－－  连接服务器  －－－
	$con = mysql_connect("127.0.0.1:3306","root","1qazse4");
	$DataName = 'ShareNavigation';
	if(!$con)
	{
		die('无法连接远程服务器: '.mysql_error);
	}
	//－－－  链接指定数据库  －－－
	mysql_query("SET NAMES UTF8");
	mysql_select_db($DataName,$con);
	
	$query = "SELECT User.UserID  AS UserID,  User.HeadPhoto  AS HeadPhoto,Friend.UUID AS UUID
				FROM User INNER JOIN Friend
				ON User.UserID = Friend.UserID
				WHERE Friend.FriendID = \"$userID\" && Friend.IsAccept = 0";
	$result = mysql_query($query);
	if(!$result)
	{
		//---  查询出错   ----
		die('FALSE');
	}
	else 
	{
		echo '<body>' ;
		while($row = mysql_fetch_array($result))
  		{
				echo '<OneFriend>';
				echo '<UserID>' .$row['UserID'].'</UserID>';
				echo '<HeadPhoto>' . $row['HeadPhoto'] . '</HeadPhoto>';
				echo '<UUID>' . $row['UUID'] . '</UUID>';
				echo '</OneFriend>';
 		}
		echo '</body>'; 	
	}
	
	mysql_close($con);
?>